// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------
thread 'UTON'



 //- Traffic is Fast Cars


WHILE TRUE
    WAIT 0
    Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
    if 0AE1: 7@ = random_actor_near_point 1@ 2@ 3@ in_radius 80.0 find_next 1 pass_deads 0 //IF and SET                                                                  
    JF continue     
    if and                                                                        
        056D:   actor 7@ defined                                                 
        803B:   not  7@ == $PLAYER_ACTOR // (int)                                
    JF continue //func hack cath only one ped and his vehicle dont repeat 
    0@ = Actor.CurrentCar(7@)                                            
    //IF //847A:   not actor 7@ driving_bike                                          
    //THEN                                                                                 
        if Actor.InCar(7@, 0@)                                                   
        THEN                                                                                                                                         
            if 056E:   car 0@ defined                                                                                                   
            THEN                                                                                                                                 
                IF not Car.HasHydraulics(0@)                                          
                THEN Car.ToggleHydraulics(0@) = True
                    if not 0@ == 0x0                                                                                                                                                   
                    then                                                                                                                                                                 
                        0A97: 13@ = car 0@ struct                                                                                                                                
                        if not 13@ == 0x0                                                                                                                                          
                        then                                                                                                                                                             
                            13@ += 0x384 // vehicle.pHandling                                                                                                                      
                            0A8D: 13@ = read_memory 13@ size 4 virtual_protect 0 // pegar o ponteiro do handling do carro                                                    
                            13@  += 0xAC //= fSuspensionForceLevel                                                                                                                 
                            0A8C: write_memory 13@ size 4 value 0.45  virtual_protect 0                                                                                              
                        END
                    END
                    if 847A:   not actor 7@ driving_bike
                    THEN        
                        0AB3: 244 > 0@ //SEND VEH HANDLER                                                    
                        //0A92: create_custom_thread "14FA51F5D0\NEON_HOOK.CS"
                    END                                         
                    if 89AE:   actor 7@ driving_train //FIXED CRASH                                
                    then                                                                   
                        0ab1: @MOUNT_4component 2 0@ 0@ //push                    
                    end                                                                    
                    if and                                                                 
                        847A:   not actor 7@ driving_bike                             
                        89AE:   actor 7@ driving_train                                
                    then                                                                   
                        0ab1: @MOUNT_4wheels 2 0@ 0@ //push                       
                    end                                                                    
                    0ab1: @MOUNT_4paintjob 2 0@ 0@ //push                         
                END                                                                        
            end                                                                            
        end                                                                                
    //end                                                                                  
    
END

:MOUNT_4component
for 6@ = 0 to 16 step 1
    06E5: get_car 0@ possible_to_built_in_component_pool_index 0 itemID_to 4@                                                                    
    if and                                                                                                                                                       
       not 4@ == -1                                                                                                                                       
       not 4@ == 1086                                                                                                                                     
       not 4@ == 0                                                                                                                                        
    then                                                                                                                            
        if not 6@ >= 16                                                                                                                                                                                                                                           
        then                                                                                                                                                     
            06E5: get_car 0@ possible_to_built_in_component_pool_index 6@ itemID_to 4@                                                                
            if and                                                                                                                                                                                                                                                       
               not 4@ == -1                                                                                                                                   
               not 4@ == 1086                                                                                                                                 
            then                                                                                                          
                if and                                                                                       
                  not 4@ == -1                                                                        
                  not 4@ == 0
                  4@ > 900                                                                                        
                then                                                                                         
                    06E9: load_car_component 4@                                                       
                    038B: load_requested_models                                                              
                    if 06EA:   car_component 4@ available                                                
                    then
                        06E7: 21@ = add_car_component 4@ to_car 0@                                       
                        06EB: release_car_component 4@ 
                    end                                                                            
                end                                                                                                          
            end                                                                                                              
        end                                                                                                                  
    end
end
0ab2: 0

:MOUNT_4wheels
0209: 8@ = random_int_in_ranges 1 17 
if 8@ == 1                                                                                                                                    
then 4@ = 1025//
    goto @mount4                                                                                                                           
else                                                                                                                                                
    if 8@ == 2                                                                                                                                    
    then 4@ = 1073//                                                                                                                          
        goto @mount4                                                                                              
    else                                                                                                                                             
        if 8@ == 3                                                                                                                                    
        then 4@ = 1074//                                                                                                                          
             goto @mount4                                                                                            
        else                                                                                                                                              
            if 8@ == 4                                                                                                                                    
            then 4@ = 1075//                                                                                                                          
                goto @mount4                                                                                                  
            else                                                                                                                                              
                if 8@ == 5                                                                                                                                    
                then 4@ = 1076//                                                                                                                          
                    goto @mount4                                                                                                          
                else                                                                                                                                              
                    if 8@ == 6                                                                                                                                    
                    then 4@ = 1077//                                                                                                                          
                        goto @mount4                                                                                                       
                    else                                                                                                                                              
                        if 8@ == 7                                                                                                                                    
                        then 4@ = 1078//                                                                                                                          
                            goto @mount4                                                                                                      
                        else                                                                                                                                              
                            if 8@ == 8                                                                                                                                    
                            then 4@ = 1079 //                                                                                                                         
                                goto @mount4                                                                                             
                            else                                                                                                                                              
                                if 8@ == 9                                                                                                                                    
                                then 4@ = 1080//                                                                                                                          
                                    goto @mount4                                                                                                        
                                else                                                                                                                                              
                                    if 8@ == 10                                                                                                                                   
                                    then 4@ = 1081//                                                                                                                          
                                        goto @mount4                                                                                                           
                                    else                                                                                                                                              
                                        if 8@ == 11                                                                                                                                   
                                        then 4@ = 1082//                                                                                                                          
                                            goto @mount4                                                                                                       
                                        else                                                                                                                                              
                                            if 8@ == 12                                                                                                                                   
                                            then 4@ = 1083//                                                                                                                          
                                                goto @mount4                                                                                                          
                                            else                                                                                                                                              
                                                if 8@ == 13                                                                                                                                   
                                                then 4@ = 1084//                                                                                                                          
                                                    goto @mount4                                                                                                      
                                                else                                                                                                                                              
                                                    if 8@ == 14                                                                                                                                   
                                                    then 4@ = 1085//                                                                                                                          
                                                        goto @mount4                                                                                          
                                                    else                                                                                                                                              
                                                        if 8@ == 15                                                                                                                                   
                                                        then 4@ = 1096//                                                                                                                          
                                                            goto @mount4                                                                                                        
                                                        else                                                                                                                                              
                                                            if 8@ == 16                                                                                                                                   
                                                            then 4@ = 1097//                                                                                                                          
                                                                goto @mount4                                                                                                          
                                                            else                                                                                                                                              
                                                                if 8@ == 17                                                                                                                                   
                                                                then 4@ = 1098//                                                                                                                          
                                                                    goto @mount4                                                                                                       
                                                                end                                   
                                                            end                                       
                                                        end                                           
                                                    end                                               
                                                end                                                   
                                            end                                                       
                                        end                                                           
                                    end                                                               
                                end                                                                   
                            end                                                                       
                        end                                                                           
                    end                                                                               
                end                                                                                   
            end                                                                                       
        end
    end
end
goto @s2
            
:mount4                                                                                                                                                                                                                                                                   
if and                                                                                                                                                              
   not 4@ == -1                                                                                                                                               
   not 4@ == 1086                                                                                                   
then                                                                                                         
    if and                                                                                                  
      not 4@ == -1                                                                         
      not 4@ == 0                                                                                                 
      4@ > 900                                                                                         
    then                                                                                                    
        06E9: load_car_component 4@                                                                    
        038B: load_requested_models                                                                            
        if 06EA:   car_component 4@ available                                              
        then                                                                                                        
            06E7: 21@ = add_car_component 4@ to_car 0@                                
            06EB: release_car_component 4@                                                   
        end                                                                                                                  
    end                                                                                          
end                                                                                  
:s2                                                                                                           
0ab2: 0

:MOUNT_4paintjob
06EC: get_car 0@ number_of_possible_paintjobs_to 10@ 
if not 10@ == 0
then
    0209: 8@ = random_int_in_ranges 1 4 
    if 8@ == 1                                                                                                          
    then                                                                                                                   
        06ED: set_car 0@ paintjob 0                                                                               
    end                                                                                                                    
    if 8@ == 2                                                                                                          
    then                                                                                                                   
        06ED: set_car 0@ paintjob 1                                                       
    end                                                                                                                    
    if 8@ == 3                                                                                                          
    then                                                                                                                   
        06ED: set_car 0@ paintjob 2                                                       
    end                                                                                                                    
    if 8@ == 4                                                                                                          
    then                                                                                                                   
        06ED: set_car 0@ paintjob 3                                                       
    end
else
    0209: 8@ = random_int_in_ranges 1 16                                                                                                                                                                 
    if 8@ == 1                                                                                                   
    then                                                                                                              
        12@ =  219                             
    end                                                                     
    if 8@ == 2                                                        
    then                                                                   
        12@ =  220                             
    end                                                                     
    if 8@ == 3                                                        
    then                                                                  
        12@ =  222                             
    end                                                                     
    if 8@ == 4                                                        
    then                                                                   
        12@ =  224                             
    end                                                                     
    if 8@ == 5                                                        
    then                                                                  
        12@ =  226                             
    end                                                                     
    if 8@ == 6                                                        
    then                                                                     
        12@ =  229                             
    end                                                                     
    if 8@ == 7                                                        
    then                                                                
        12@ =  252                             
    end                                                                     
    if 8@ == 8                                                        
    then                                                                  
        12@ =  253                             
    end                                                                     
    if 8@ == 9                                                        
    then                                                                 
        12@ =  254                             
    end
    if 8@ == 10                                                                                                   
    then                                                                                                              
        12@ =  5                       
    end                                                                 
    if 8@ == 11                                                    
    then                                                               
        12@ =  3                       
    end                                                                 
    if 8@ == 12                                                    
    then                                                              
        12@ =  6                       
    end                                                                 
    if 8@ == 13                                                    
    then                                                               
        12@ =  85                        
    end                                                                 
    if 8@ == 14                                                    
    then                                                              
        12@ =  86                        
    end                                                                                                                
    if 8@ == 15                                                                                                   
    then                                                                                                                
        12@ =  126                        
    end                                                                
    if 8@ == 16                                                   
    then                                                           
        12@ =  127                        
    end                                                                                                                
    03F3: get_car 0@ primary_color_to 13@ secondary_color_to 11@ 
    0229: set_car 0@ primary_color_to 12@ secondary_color_to 11@ 
    0209: 8@ = random_int_in_ranges 1 16                                                                                                                                                                  
    if 8@ == 1                                                                                                   
    then                                                                                                              
        12@ =  219                             
    end                                                                     
    if 8@ == 2                                                        
    then                                                                   
        12@ =  220                             
    end                                                                     
    if 8@ == 3                                                        
    then                                                                  
        12@ =  222                             
    end                                                                     
    if 8@ == 4                                                        
    then                                                                   
        12@ =  224                             
    end                                                                     
    if 8@ == 5                                                        
    then                                                                  
        12@ =  226                             
    end                                                                     
    if 8@ == 6                                                        
    then                                                                     
        12@ =  229                             
    end                                                                     
    if 8@ == 7                                                        
    then                                                                
        12@ =  252                             
    end                                                                     
    if 8@ == 8                                                        
    then                                                                  
        12@ =  253                             
    end                                                                     
    if 8@ == 9                                                        
    then                                                                 
        12@ =  254                             
    end
    if 8@ == 10                                                                                                   
    then                                                                                                              
        12@ =  5                       
    end                                                                 
    if 8@ == 11                                                    
    then                                                               
        12@ =  3                       
    end                                                                 
    if 8@ == 12                                                    
    then                                                              
        12@ =  6                       
    end                                                                 
    if 8@ == 13                                                    
    then                                                               
        12@ =  85                        
    end                                                                 
    if 8@ == 14                                                    
    then                                                              
        12@ =  86                        
    end                                                                                                                
    if 8@ == 15                                                                                                   
    then                                                                                                                
        12@ =  126                        
    end                                                                
    if 8@ == 16                                                   
    then                                                           
        12@ =  127                        
    end                                                                                                                
    03F3: get_car 0@ primary_color_to 11@ secondary_color_to 13@ 
    0229: set_car 0@ primary_color_to 11@ secondary_color_to 12@                                                                                                                          
end         
0ab2: 0